package com.bsj.power.common.def.entity.alarmLevel;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author LiJiaXin
 * @version 1.0.0
 * @description AlarmLevel
 * @time 2024/9/6 10:13
 */
@Data
@TableName(value = "tab_alarm_level")
@NoArgsConstructor
public class AlarmLevel {

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 报警码
     */
    @TableField("code")
    private Integer code;

    /**
     * 报警名称
     */
    @TableField("name")
    private String name;

    /**
     * 报警级别
     */
    @TableField("level")
    private Integer level;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public AlarmLevel(Integer code, String name, Integer level) {
        this.code = code;
        this.name = name;
        this.level = level;
    }
}
